﻿@page "/"

<Button Color="Color.Primary">Primary</Button>
<Button Color="Color.Danger" data-toggle="collapse">Danger</Button>


<Button Color="Color.Primary" @onclick="Alert">Alert</Button>

@inject IJSRuntime Js

@code {
    private IJSObjectReference _jsModule;

    protected override async Task OnInitializedAsync()
    {
        _jsModule = await Js.InvokeAsync<IJSObjectReference>("import", "./demo.js");
    }
    public async Task Alert()
    {
        dynamic module = await Js.Import("./demo.js");
        module.show("hello");

        await _jsModule.InvokeVoidAsync("show", "hellow");
    }
}